package com.example.leetcode.graph;

import com.example.leetcode.graph.common.GraphUtils;

class Solution261 {
    public boolean validTree(int n, int[][] edges) {
        return GraphUtils.validTree(n, edges);
    }
}

public class leetcode261 {
    public static void main(String[] args) {
        Solution261 solution261 = new Solution261();

        int n = 5;
        int[][] edges = {{0, 1}, {0, 2}, {0, 3}, {1, 4}};
        System.out.println(solution261.validTree(n, edges));

        int n1 = 5;
        int[][] edges1 = {{0, 1}, {1, 2}, {2, 3}, {1, 3}, {1, 4}};
        System.out.println(solution261.validTree(n1, edges1));
    }
}
